<?php

 $xml = simplexml_load_file("xml/diet.xml");

foreach ($xml as $list) {

    echo "Lista: {$list->name}<br />";

    foreach($list->list->nutriment as $values) {
        foreach($values->attributes() as $attr => $value){
            echo "&nbsp;&nbsp;&nbsp;{$attr}: {$value}<br />" ;
        }
    }
    
    echo "<br />";
}

?>